import request from '@/utils/request'
const preUrl = '/good'
export default {
    get(id) {
        return request({
            url: preUrl + `/get/${id}`,
            method: 'get',
        })
    }, 
    gets(ids) {
        return request({
            url: preUrl + `/gets`,
            method: 'post',
            data: ids
        })
    }, 
    add(good) {
        return request({
            url: preUrl + `/add`,
            method: 'post',
            data: good
        })
    }, 
    update(good) {
        return request({
            url: preUrl + `/update`,
            method: 'post',
            data: good
        })
    },
    delete(id) {
        return request({
            url: preUrl + `/delete/${id}`,
            method: 'delete',
        })
    },
    deletes(ids) {
        return request({
            url: preUrl + `/deletes`,
            method: 'delete',
            data: ids
        })
    },
    page(page){
        return request({
            url: preUrl + `/page`,
            method: 'post',
            data: page
        })
    }
}
